import 'package:flutter/material.dart';
import 'components/keyboards/keyboard_root.dart';
import 'components/keyboards/mocks/mock_binding.dart';
import 'components/keyboards/number_keyboard.dart';
import 'controller/Controller.dart';
import 'package:get/get.dart';

import 'pages/BottomNavPage.dart';

void main() {
  Controller.initLazy();
  NumberKeyboard.register(); //注册键盘
  runMockApp(KeyboardRootWidget(child: MyApp())); //添加了KeyboardRootWidget
  // runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      // showSemanticsDebugger: true,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return BottomNavPage(); //底部导航组件
  }
}
